//
//  HuoDongDetailView.m
//  LoverGo
//
//  Created by liudonghuan on 14-9-4.
//
//

#import "HuoDongDetailView.h"

@implementation HuoDongDetailView
@synthesize hdDelegate = _hdDelegate;
- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = LGCOLOR_gray;
        _activityScrollView = [[UIScrollView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_HEIGHT, frame.size.height)];
        _activityScrollView.contentSize = CGSizeMake(SCREEN_WIDTH, 480);
        _activityHeadImage = [[EMAsyncImageView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 177)];
        _activityTitle = [[UILabel alloc]initWithFrame:CGRectMake(0, 177, SCREEN_WIDTH, 34)];
        _activityPrice = [[ImageLabelViewItem alloc]initWithFrame:CGRectMake(0, 211, SCREEN_WIDTH, 40) Flag:1];
        _activityOpenTime = [[ImageLabelViewItem alloc]initWithFrame:CGRectMake(0, 252, SCREEN_WIDTH, 40) Flag:1];
        _moreInfo = [[ImageLabelViewItem alloc]initWithFrame:CGRectMake(0, 311, SCREEN_WIDTH, 40) Flag:0];
        _shangJia = [[ImageLabelViewItem alloc]initWithFrame:CGRectMake(0, 352, SCREEN_WIDTH, 40) Flag:0];
        _joinActivity = [[UIButton alloc]initWithFrame:CGRectMake(20, 411, 280, 40)];

        _activityTitle.font = [UIFont fontWithName:@"Helvetica" size:14];
        _activityTitle.textColor = [UIColor whiteColor];
        _activityTitle.backgroundColor = LGCOLOR_blue;
        
        _activityPrice.itemimage.image = [UIImage imageNamed:@"blue_ico_price.png"];
        _activityOpenTime.itemimage.image = [UIImage imageNamed:@"blue_ico_time.png"];
        _moreInfo.itemimage.image = [UIImage imageNamed:@"blue_ico_more.png"];
        _shangJia.itemimage.image = [UIImage imageNamed:@"blue_ico_addr.png"];
        _moreInfo.itemtext.text = @"更多详情";
        _shangJia.itemtext.text = @"活动商家";
        [_joinActivity setTag:BtnTypejoinActivity];
        [_joinActivity addTarget:self action:@selector(Btnonclick:) forControlEvents:UIControlEventTouchUpInside];
        [_joinActivity setTitle:@"点击参与" forState:UIControlStateNormal];
        [_joinActivity setBackgroundColor:LGCOLOR_pink];
        [_joinActivity.layer setCornerRadius:3.0];
        [self addSubview:_activityScrollView];
        [_activityScrollView addSubview:_activityHeadImage];
        [_activityScrollView addSubview:_activityTitle];
        [_activityScrollView addSubview:_activityPrice];
        [_activityScrollView addSubview:_activityOpenTime];
        [_activityScrollView addSubview:_moreInfo];
        [_activityScrollView addSubview:_shangJia];
        [_activityScrollView addSubview:_joinActivity];
    }
    return self;
}

-(void)Btnonclick:(UIButton *)btn
{
    [self.hdDelegate hdBtnOclick:self Button:btn.tag];
}

@end
